import {
	defineStore
} from 'pinia';
import {
	ref
} from 'vue';
export const homeStore = defineStore('home',
	() => {
		const token = ref("")
		const setToken = (val) => {
			console.log('valie', val);
			token.value = val;
		}
		const remToken = () => {
			token.value = undefined;
		}
		return {
			token,
			setToken,
			remToken
		}
	}, {
		persist: {
			storage: {
				getItem(key) {
					return uni.getStorageSync(key)
				},
				setItem(key, value) {
					uni.setStorageSync(key, value)
				},
			},
		},
	})